package cn.pzhu.java.ch02.varscope;

class OurClass {
	   int i; // instance variable of class OurClass

	   int firstMethod() {
	       int j=0; // local variable
	       //k=100;
	       i=200;
	             // both i and j are accessible from this point
	            // ...
	       return 1;
	   } // end of firstMethod()

	   int secondMethod(float f) { //method parameter
	        int j=0; //local variable. Different from the  j defined in firstMethod().
	            // Scope is limited to the body of  secondMethod().
	           // Both i(instance variable of the class OurClass) and j (local variable of this method)
	           // are accessible from this point.
	            //  ....
	        j=100;
	        i=100;
	        f=100;
	        for(int k=0;k<10;k++){
	        	//k;
	        }
	        //k=100;
	        
	        int foo;
	        //System.out.println(foo);
	          return 2;
	       } // end of secondMethod()
	    } // end of class OurClass
